package com.fili.gui.dialogs.config;

import com.fili.core.params.DryParams;

import javax.swing.*;

/**
 * Created by Claudiu-Florin FILIMON
 * Date: Oct 29, 2006
 * Time: 12:11:51 PM
 */
public class GuiConfigPanel extends JPanel
{
    private JCheckBox cbMinimizeOnClose;
    private JCheckBox cbConfirmClose;


    public GuiConfigPanel()
    {
        setSize(169 + 6, 49 + 34);
        setLayout(null);

        cbMinimizeOnClose = new JCheckBox("Minimizeaza la inchidere", DryParams.getParams().isGuiMinimizeOnClose());
        cbMinimizeOnClose.setBounds(8, 8, 153, 17);
        add(cbMinimizeOnClose);

        cbConfirmClose = new JCheckBox("Confirma inchidere", DryParams.getParams().isGuiConfirmClose());
        cbConfirmClose.setBounds(8, 24, 153, 17);
        add(cbConfirmClose);
    }

    public void saveParams()
    {
        DryParams.getParams().setGuiConfirmClose(cbConfirmClose.isSelected());
        DryParams.getParams().setGuiMinimizeOnClose(cbMinimizeOnClose.isSelected());
    }
}
